package zcx;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.02.09.15.16
 */
public class Ftext {
    public static void main(String[] args) {
        var c=String.class;
        var ms=c.getMethods();
        var mm=c.getDeclaredMethods();
        Method[] methods=c.getDeclaredMethods();
        for (Method m1:ms){
            System.out.println( " "+m1.getReturnType().getName()+"");
            System.out.println(m1.getName()+"();");
        }
        System.out.println("--".repeat(50));
        for (Method method:methods){
            //打印权限修饰符，public,protected,private
            //System.out.println(Modifier.toString(method.getModifiers()));
            //打印返回值类型名称
            System.out.println( " "+method.getReturnType().getName()+"");
            //打印方法名称
            System.out.println(method.getName()+"();");
        }
        System.out.println(c.arrayType());
    }
}
